import java.util.Comparator;

public class User implements Comparator<User>{
     int age;
     String name;
    public User(int age, String name){
        this.age = age;
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "User{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';

    }

    public int compareTo(User o) {
        return this.getAge()-o.getAge();
    }

    @Override
    public int compare(User o1, User o2) {
        return 0;
    }
}
